<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
        <title>
        {% block title %}
        {% endblock %} 
        </title>
        {% block extra_head %}
        <link rel="stylesheet" href="/hg/site_media/style/main_style.css" />
        <style type="text/css"> 
            @import "http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css"; 
            @import "http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/resources/dojo.css"; 
        </style> 
		<script>
			function add_repo()
			{
				options.submit();
			}
		</script>
        {% endblock %}
    </head>
    <body class=" claro ">
    	<div class="head">
    		<h1>{{lang.RepositoriesTitle}}</h1>
			<div class="img_logo"><img src="/hg/site_media/images/logo.png" alt="logo" /></div>
    	</div>
        <div class="content">
        {% if messages_list %}
		<div id="tp1" dojoType="dijit.TitlePane" title="Wiadomosci" open="true">
        {% for msg in messages_list %}
        <div class="message">{{msg}}</div>
        {% endfor %}
		</div>
		{% endif %}
		
		
          <div id="tp2" dojoType="dijit.TitlePane" title="Opcje" open="false">
          {% if login %}
		  <div class="center_frame">
          <form action="/hg/add/" method="post" id="options">
          	{% csrf_token %}
			<label for="repository_name">Nazwa nowego repozytorium :</label><br/>
			<input type="text" name="repository_name" value="" dojoType="dijit.form.TextBox" trim="true" id="repository_name" /><br />
			<label for="repository_path">Nazwa katalogu dla nowego repozytorium :</label><br />
            <input type="text" name="repository_path" value="" dojoType="dijit.form.TextBox" trim="true" id="repository_path" /><br />
			<label for="repository_desc">Krotki Opis :</label>
			<br /><textarea id="repository_desc" name="repository_desc" dojoType="dijit.form.SimpleTextarea" rows="4" cols="30" style="width:auto;"></textarea>
            <br /><button dojoType="dijit.form.Button" type="button" onClick="add_repo()">Dodaj Nowe Repozytorium</button>
		  </form>
		  </div>
		  {% else %}
		      <div class="message">Musisz sie zalogowac !</div>
			  <div class="center_frame">
			  <form action="/hg/login/" method="post" id="login_form">
			  {% csrf_token %}
              <label for="login_name">Nazwa uzytkownika :</label><br/>
              <input type="text" name="login_name" value="" dojoType="dijit.form.TextBox" trim="true" id="login_name" /><br />
              <label for="login_pass">Haslo :</label><br />
              <input type="password" name="login_pass" dojoType="dijit.form.TextBox" value="" id="login_pass" /><br />
              <button type="button" dojoType="dijit.form.Button" onClick="login_form.submit()">Zaloguj sie</button>
              </form>
			  </div>
		  {% endif %}
		  
<!--			<div id="gridDiv" style="width: 100%; height: 100%;">
			</div>
	-->	  
          </div>
          <div id="tp3" dojoType="dijit.TitlePane" title="Repozytoria" open="true"> 
            {% block content %}
            {% endblock  %}
          </div>
          <div id="tp4" dojoType="dijit.TitlePane" title="Stopka" open="true"> 

          </div>
        </div>
		<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" type="text/javascript" djConfig="parseOnLoad: true"></script>
		<script type="text/javascript">
            dojo.require("dijit.TitlePane");
			dojo.require("dijit.form.Button");
			dojo.require("dijit.form.TextBox");
			dojo.require("dijit.form.SimpleTextarea");
    		
        </script>
		
    </body>
</html>